<template>
  <div ref="chartDom" style="width: 100%;height:100%;"></div>
</template>

<script>

export default {
  name: "AssetTable3",
  data() {
    return {
    }
  },
  mounted() {
    this.initChart();
  },
  methods: {
    initChart() {
      const chartDom = this.$refs.chartDom;
      const chart = this.$echarts.init(chartDom);
      var option = {
        backgroundColor: '#fff',
        tooltip: {
          trigger: 'axis',
          axisPointer: {
            type: 'cross',
            crossStyle: {
              color: '#999'
            }
          }
        },
        grid: {
        },
        legend: {
          data: ['数据系列 2'],
          textStyle: {
            color: '#666'
          }
        },
        xAxis: {
          type: 'category',
          boundaryGap: [true, false],
          data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
          axisLabel: {
            color: '#666'
          },
          axisLine: {
            lineStyle: {
              color: '#ccc'
            }
          }
        },
        yAxis: {
          type: 'value',
          axisLabel: {
            color: '#666'
          },
          axisLine: {
            lineStyle: {
              color: '#ccc'
            }
          },
          splitLine: {
            lineStyle: {
              color: '#eee'
            }
          }
        },
        series: [
          {
            name: '数据系列 2',
            type: 'line',
            smooth: true,
            data: [220, 182, 191, 234, 290, 330, 310],
            itemStyle: {
              color: '#d14a61'
            },
            lineStyle: {
              color: '#d14a61'
            },
            label: {
              show: true,
              position: 'top',
              color: '#d14a61'
            }
          }
        ]
      };
      chart.setOption(option);
    }
  }
}
</script>

<style scoped>

</style>